package com.example.aspects;

import com.example.anno.CheckUser;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class CheckUserAspect {

    @Around("@annotation(checkUser)")
    public  Object checkUser(ProceedingJoinPoint joinPoint, CheckUser checkUser) throws Throwable {
        //权限校验
        System.out.println("权限");
        //逻辑判断。。。。


        return  joinPoint.proceed();
    }
}
